key? 

Reports true if a key is being pressed on the keyboard. You must click on the background of the page (outside of a text box, the Command Center, or Procedures page) for key? to work. Use readchar to reset key? to false.

Example: 

First run the instruction and press a key after MicroWorlds starts displaying the word false.

repeat 10 [show key? wait 5] 

Click on the page.

false 
false 
true
   You pressed a key.
true 
...